package com.hazardSoft.eStore.entities;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

import com.hazardSoft.eStore.utils.QueryConstants;

@Entity
@NamedQueries({
	@NamedQuery(name = QueryConstants.QUERY_LIST_ROLES, query = "FROM Role r ORDER BY r.name ASC")
})
public class Role implements Serializable {
	@Id
	private int id;

	@Lob
	private String name;

//	@OneToMany(mappedBy="role")
//	private Set<User> userCollection;

	private static final long serialVersionUID = 1L;

	public Role() {
		super();
	}

	public Role(int id) {
		this.id = id;
	}

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

//	public Set<User> getUserCollection() {
//		return this.userCollection;
//	}
//
//	public void setUserCollection(Set<User> userCollection) {
//		this.userCollection = userCollection;
//	}

}
